with open('pi_digits.txt') as file_object:
    # contents = file_object.read()
    # print(contents)

    # 逐行读取
    pi = ''
    for line in file_object:
        # print(line)
        print(line.rstrip())
        pi += line.rstrip()
    print(float(pi))

    print(pi[:4])
